import Vue from 'vue'
import Vuex from 'vuex'


Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        user: {}, //保存登录用户的基本信息
        routes: [] //保存菜单权限
    },
    getters: {},


    mutations: {
        setUser(state, user) { //保存用户基本信息
            state.user = user
        },
        setRoutes(state, routes) {
            state.routes = routes
        }
    },
    actions: {},
    modules: {},

})